package com.migo.thread;

import com.migo.entity.PvMgFirmwareLogEntity;
import com.migo.service.PvMgFirmwareLogService;

import java.util.Date;

/**
 *  报错固件升级日志
 */
public class PvMgFirmwareLogThread implements Runnable{
    private PvMgFirmwareLogService pvMgFirmwareLogService;
    private PvMgFirmwareLogEntity pvMgFirmwareLogEntity;

    public PvMgFirmwareLogThread(PvMgFirmwareLogService pvMgFirmwareLogService, PvMgFirmwareLogEntity pvMgFirmwareLogEntity){
         this.pvMgFirmwareLogService = pvMgFirmwareLogService;
         this.pvMgFirmwareLogEntity =pvMgFirmwareLogEntity;
    }
    @Override
    public void run() {
        pvMgFirmwareLogEntity.setCreateTime(new Date());
        pvMgFirmwareLogService.save(pvMgFirmwareLogEntity);
    }
}
